home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 July to December / Ahoy_Magazine_84-Jul-Dec_1984_Double_L_unofficial.d64 / micro minder 85 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  259 lines

  1. 1 rem ******  micro - minder  ******
  2. 2 rem ******** designed  by ********
  3. 3 rem ** bob lloret and joe fusco **
  4. 4 rem ***** for ahoy! magazine *****
  5. 5 rem
  6. 20 rem ****** title screen ******
  7. 30 rem ==========================
  8. 40 print "[147]":poke 53280,0:poke 53281,0:print
  9. 80 print tab(8);" [223][146]  [169] [146] [209]"
  10. 90 print tab(8);"[158]  [223][169]  "
  11. 100 print tab(8);"  [146][223][169]  [146]  [146]    [146]    [146]    "
  12. 110 print tab(8);"[159]  [146]    [146]  [146]  [146]    [146]    [146]  "
  13. 120 print tab(8);"  [146]    [146]  [146]    [146]  [146]      "
  14. 130 print
  15. 140 print tab(8);"[156] [223][146]  [169] [146] [209]        "
  16. 150 print tab(8);"[149]  [223][169]  [146]          "
  17. 160 print tab(8);"[154]  [146][223][169]  [146]  [146]   [223][146]    [146]  [146][184][184]    "
  18. 170 print tab(8);"[158]  [146]    [146]  [146]  [146]  [146]  [146]  [146]  [146][162]   "
  19. 180 print tab(8);"[159]  [146]    [146]  [146]  [146]  [146]    [146]  [146][162][162]  ":print:print
  20. 185 print "[145]                                        "
  21. 190 for a=1 to 7:print"[145] [191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191] ":next a
  22. 192 print "[145]                                        "
  23. 195 print "[145][145][145][145][145][145][145][145][145]"
  24. 200 msg$="               **  designed by.....bob lloret  **"
  25. 205 print tab(5);"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]"
  26. 206 print tab(5);"[145][166]                            [166]"
  27. 210 print tab(5);"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":print "[145][145][145]"
  28. 215 m$=right$(msg$,len(msg$)-1):c$=m$+left$(msg$,1)
  29. 220 print tab(6);"[145][159]";left$(c$,28):msg$=c$
  30. 225 for d=1 to 70:next d:msg=msg+1:if msg=75 then 240
  31. 230 goto 215
  32. 240 a$(1)="@0:indx-mon,s,r"
  33. 250 a$(2)="@0:indx-dat,s,r"
  34. 260 a$(3)="@0:indx-nam,s,r":c$="0"
  35. 270 n=0:c=0:si=54272:for so=0 to 24:poke so+si,0:next so
  36. 280 print "":dim a(5,7),mo$(100),dt$(100),na$(100),dt(100)
  37. 290 goto 10000
  38. 300 print "[147]":poke 53280,4:poke 53281,1:print:s=0:hi=37:lo=162:gosub 11000
  39. 305 rem *****  main menu  *****
  40. 306 rem =======================
  41. 310 print tab(5);"[156][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  42. 315 print tab(5);"[156][221] *  s e l e c t i o n s  [156]* [221]"
  43. 320 print tab(5);"[156][173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  44. 330 print tab(10);"[156][1][146] add app'ts"
  45. 340 print tab(10);"[156][2][146] delete app'ts"
  46. 350 print tab(10);"[156][3][146] list app'ts"
  47. 360 print tab(10);"[156][4][146] check app'ts"
  48. 370 print tab(10);"[156][5][146] terminate session"
  49. 380 print tab(10);"your choice [156][1-5][146]"
  50. 385 get choice:if choice=0 then 385
  51. 399 hi=33:lo=135:gosub 11000
  52. 400 if choice=1 then c=0:goto 500
  53. 410 if choice=2 then c=0:goto 700
  54. 420 if choice=3 then 1420
  55. 430 if choice=4 then 1600
  56. 440 if choice=5 then 1100
  57. 498 rem *** add appointments ***
  58. 499 rem ========================
  59. 500 print "[147]":poke 53280,2:poke 53281,1:n=n+1:c=c+1
  60. 505 print "[145][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]"
  61. 506 print "[145][191][191][191][191][191][191][191][191][191][191][191]                  [191][191][191][191][191][191][191][191][191][191][191]"
  62. 510 print "[145][191][191][191][191][191][191][191][191][191][191][191] add appointments [191][191][191][191][191][191][191][191][191][191][191]"
  63. 515 print "[145][191][191][191][191][191][191][191][191][191][191][191][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][191][191][191][191][191][191][191][191][191][191][191]"
  64. 520 for a=1 to 4:print:next a
  65. 530 printtab(10);"enter month";:input mo$(n):ifmo$(n)="" then print"[145][145]":goto530
  66. 540 printtab(10);"enter date";:input dt$(n):ifdt$(n)="" thenprint"[145][145][145]":goto540
  67. 545 print
  68. 550 printtab(10);"enter name";:inputna$(n):ifna$(n)=""thenprint"[145][145]":goto550
  69. 570 print tab(13);"any more (y/n)"
  70. 590 get an$:if an$="" then 590
  71. 600 if an$="y" then 500
  72. 610 print tab(8);"";c;"app'ts were added":forz=1to1500:next:goto300
  73. 698 rem **** delete app'ts ****
  74. 699 rem =======================
  75. 700 print "[147]":poke 53280,6:poke 53281,1:c=c+1
  76. 710 print "[145][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]"
  77. 711 print "[145][191][191][191][191][191][191][191][191][191][191]                     [191][191][191][191][191][191][191][191][191][191]"
  78. 715 print "[145][191][191][191][191][191][191][191][191][191][191] delete appointments [191][191][191][191][191][191][191][191][191]"
  79. 720 print "[145][191][191][191][191][191][191][191][191][191][191][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][191][191][191][191][191][191][191][191][191]"
  80. 730 for a=1 to 5:print:next a:print tab(10);"enter app't no.";:input dl
  81. 740 mo$(dl)="***":dt$(dl)="**":na$(dl)="*****"
  82. 750 for a=1 to 9:print:next a
  83. 760 print tab(13);"anymore [y/n]"
  84. 770 get an$:if an$="" then 770
  85. 780 if an$="y" then 700
  86. 790 print tab(8);"";c;"app'ts were deleted":for d=1 to 1500:next d
  87. 800 goto 300
  88. 1100 rem ** write file routine **
  89. 1110 rem ========================
  90. 1115 fg=0
  91. 1120 open2,8,2,"@0:indx-mon,s,w"
  92. 1130 for j=1 to n
  93. 1135 ifmo$(j)="**"then fg=fg+1:goto1181
  94. 1180 print#2,mo$(j)
  95. 1181 next
  96. 1182 close2
  97. 1190 open2,8,2,"@0:indx-dat,s,w"
  98. 1191 forj=1 to n
  99. 1195 if dt$(j)="**" then 1202
  100. 1200 print#2,dt$(j)
  101. 1202 next
  102. 1203 close2
  103. 1210 open2,8,2,"@0:indx-nam,s,w"
  104. 1220 for j=1 to n
  105. 1222 if na$(j)="**" then 1232
  106. 1230 print#2,na$(j)
  107. 1232 next
  108. 1233 close2
  109. 1240 open2,8,2,"@0:indx-list,s,w"
  110. 1250 print#2,n-fg:close2
  111. 1260 print "[147][159]":poke 53280,14:poke 53281,6:end
  112. 1400 rem *** list app'ts ***
  113. 1410 rem ====================
  114. 1420 print"[147]":poke 53280,9:poke 53281,7:i=0
  115. 1430 print "[149][145][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]"
  116. 1435 print "[149][145][191][191][191][191][191][191][191][191][191][191][191]                   [191][191][191][191][191][191][191][191][191][191][191]"
  117. 1440 print "[145][191][191][191][191][191][191][191][191][191][191][191] [144]list appointments [149][191][191][191][191][191][191][191][191][191][191]"
  118. 1445 print "[145][191][191][191][191][191][191][191][191][191][191][191][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][191][191][191][191][191][191][191][191][191][191]":ta=10
  119. 1460 for j=1 to n:i=i+1:if j>9 then ta=9
  120. 1465 printtab(ta);"[144]";j;" ";
  121. 1470 print mo$(j);" ";
  122. 1480 print dt$(j);", ";
  123. 1490 print name$(j)
  124. 1500 if i=16 then 1520
  125. 1510 next j
  126. 1520 print tab(4);"[149]press f1 for more [144]or [149]f3 for menu"
  127. 1530 get an$:if an$="" then 1530
  128. 1540 if an$="[133]" and i=16 then i=0:gosub 2300:goto 1510
  129. 1550 goto 300
  130. 1598 rem **** check app'ts ****
  131. 1599 rem ======================
  132. 1600 print "[147]":poke 53280,6:poke 53281,7
  133. 1605 print:print tab(11);"[144]* check app'ts *"
  134. 1610 for a=1 to 7:print:next a
  135. 1620 print tab(6);"which month? (jan-dec)";:input mn$
  136. 1630 if mn$="jan" then day=13:dys=31
  137. 1640 if mn$="feb" then day=28:dys=29
  138. 1650 if mn$="mar" then day=28:dys=31
  139. 1660 if mn$="apr" then day=8:dys=30
  140. 1670 if mn$="may" then day=18:dys=31
  141. 1680 if mn$="jun" then day=33:dys=30
  142. 1690 if mn$="jul" then day=8:dys=31
  143. 1700 if mn$="aug" then day=23:dys=31
  144. 1710 if mn$="sep" then day=3:dys=30
  145. 1720 if mn$="oct" then day=13:dys=31
  146. 1730 if mn$="nov" then day=28:dys=30
  147. 1740 if mn$="dec" then day=3:dys=31
  148. 1745 gosub 2000
  149. 1746 forso=1to35:q=int(rnd(0)*200)+1:poke si+24,15:poke si+5,2:poke si+6,50
  150. 1747 poke si+4,17:poke si+1,q:poke si,q:for d=1 to 10:next d:next so
  151. 1748 poke si+4,32:poke si+1,0:poke si,0
  152. 1750 gosub 2200
  153. 1751 p=pos(0):if p>0 then l2=7
  154. 1752 if p=12 and mn$="dec" then l2=4
  155. 1753 if p=12 and mn$="apr" then l2=7
  156. 1754 if p=0 or p=7 then l2=4
  157. 1755 for l=1 to l2:print:next l:print tab(9);"press f1 for main menu"
  158. 1756 print "[145][145][145][145][145]"
  159. 1760 for j=1 to n
  160. 1770 if mo$(j)<>mn$ then 1810
  161. 1780 print tab(22);"[145]";dt$(j);"-";na$(j)
  162. 1790 get an$:if an$="" then 1790
  163. 1795 if an$="[133]" then 300
  164. 1796 if an$=chr$(32) then 1805
  165. 1800 if an$<>"[133]" or an$<>chr$(32) then 1790
  166. 1805 print tab(22);"[145]               [160]"
  167. 1810 next j
  168. 1820 print tab(22);"[145]no more app'ts"
  169. 1830 get an$:if an$="" then 1830
  170. 1840 goto 300
  171. 1998 rem *** draw calendar ***
  172. 1999 rem =====================
  173. 2000 print "[147]":poke 53280,2:poke 53281,15
  174. 2005 print tab(12);"[145]date:";mn$;" 1985"
  175. 2010 print:print "    sun  mon  tue  wed  th  fri  sat"
  176. 2020 print "[144]  [176][195][195][195][195][178][195][195][195][195][178][195][195][195][195][178][195][195][195][195][178][195][195][195][195][178][195][195][195][195][178][192][192][192][192][174]"
  177. 2030 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  178. 2040 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  179. 2050 print "  [171][195][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  180. 2060 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  181. 2070 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  182. 2080 print "  [171][195][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  183. 2090 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  184. 2100 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  185. 2110 print "  [171][195][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  186. 2120 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  187. 2130 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  188. 2140 print "  [171][195][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  189. 2150 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  190. 2160 print "  [221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]"
  191. 2170 print "  [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189]"
  192. 2180 print "  [221]    [221]    [221]":print "  [221]    [221]    [221]"
  193. 2185 print "  [173][192][192][192][192][177][192][192][192][192][189]";
  194. 2190 print "[145][145]  app't:":return
  195. 2200 t=day:print "":cnt=0:j=1
  196. 2210 for b=1 to 5:for c=1 to 7:cnt=cnt+1
  197. 2220 a(b,c)=cnt:next c:next b:print ""
  198. 2224 for j=1 to n
  199. 2225 ifmo$(j)=mn$ then 2230
  200. 2226 next j
  201. 2230 for b=1 to 5:for c=1 to 7
  202. 2235 dt(j)=val(dt$(j))
  203. 2240 if mo$(j)<>mn$ then 2255
  204. 2245 if dt(j)<>a(b,c) then  2255
  205. 2250 goto 2260
  206. 2255 print tab(t);"[144]";a(b,c);:goto 2265
  207. 2260 print tab(t);a(b,c);"[157][157]*[145][144]";:j=j+1
  208. 2265 t=t+5:if t>35 then t=3:for l=1 to 3:print:next l
  209. 2270 if a(b,c)>=dys then 2290
  210. 2280 next c:next b
  211. 2290 return
  212. 2298 rem **** erase screen ****
  213. 2299 rem ======================
  214. 2300 print "":for a=1 to 2:print:next a
  215. 2310 for a=1 to 18:print"                                      ":next a
  216. 2320 print "":print "":return
  217. 4998 rem **** open new file ****
  218. 4999 rem =======================
  219. 5000 print"[147]";:print"creating calendar"
  220. 5005 forx=1to3
  221. 5010 open2,8,2,a$(x)
  222. 5015 print#2,c$
  223. 5020 close2
  224. 5025 nextx
  225. 5030 open2,8,2,"@0:indx-list,s,w"
  226. 5035 print#2,0:close2:goto10000
  227. 5998 rem **** read file ****
  228. 5999 rem ===================
  229. 6000 print "[147]":poke 53280,0:poke 53281,9:fora=1to7:print:nexta
  230. 6005 print tab(10);"[158]one moment please..."
  231. 6006 print tab(5);"i'm loading your appointments"
  232. 6010 open2,8,2,"@0:indx-list,s,r"
  233. 6015 input#2,n:close2:ifn=0then300
  234. 6025 open2,8,2,a$(1)
  235. 6030 forx=1ton
  236. 6035 input#2,mo$(x):nextx:close2
  237. 6040 open2,8,2,a$(2)
  238. 6045 forx=1ton
  239. 6050 input#2,dt$(x):nextx:close2
  240. 6060 open2,8,2,a$(3)
  241. 6065 forx=1ton
  242. 6070 input#2,na$(x):nextx:close2:goto300
  243. 10000 print "[147]":poke 53280,0:poke 53281,0
  244. 10003 print tab(15);"[213][195][195][195][195][195][195][195][195][201]"
  245. 10004 print tab(11);"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
  246. 10005 print tab(7);"[195][195][195]<[194]* micro-minder *[194]>[195][195][195]"
  247. 10006 print tab(11);"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
  248. 10007 print tab(15);"[202][195][195][195][195][195][195][195][195][203]"
  249. 10010 for a=1 to 5:print:next a
  250. 10020 print tab(12);"[1][146] new calendar":print tab(12);"[2][146] old calendar"
  251. 10030 for a=1 to 8:print:next a
  252. 10040 print tab(11);"[159]enter choice [1-2]"
  253. 10050 get q:if q=0 then 10050
  254. 10060 on q goto 5000,6000
  255. 11000 rem
  256. 11010 poke si+24,15:poke si+5,2:poke si+6,100:poke si+4,33
  257. 11020 poke si+1,hi:poke si,lo:for d=1 to 130:next d
  258. 11030 poke si+4,16:poke si+1,0:poke si,0:return
  259.